package com.xiaojiezhu.netty.base.demo.pojo;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;

/**
 * 作者 zxj<br>
 * 时间 2017/7/14 15:07
 * 说明 ...
 */
public class TimerEncoder2 extends MessageToByteEncoder<UnixTime> {
    protected void encode(ChannelHandlerContext ctx, UnixTime msg, ByteBuf out) throws Exception {
        out.writeInt((int)msg.getValue());
    }
}
